package com.linzelin.mapper;

import com.linzelin.po.User;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface UserMapper {
    List<User> selectUser();

    @Insert("insert into user values(#{id},#{name},#{pwd})")
    int insertUser(User user);

    @Delete("deletes from user where id = #{id}")
    int deleteUser(@Param("id") int id);

    @Update("update user set name=#{name},pwd=#{pwd} where id = #{id}")
    int updateUser(User user);
}
